package com.stock.service;



import com.stock.pojo.StockWarningConfig;

import java.util.List;

public interface StockService {
    void decreaseStock(String productId, int quantity) throws IllegalArgumentException;
    void increaseStock(String productId, int quantity);
    int getStockQuantity(String productId);
    void setStockWarningThreshold(String productId, int threshold);
    boolean isBelowStockWarning(String productId);
    // 新增接口方法示例，用于批量扣减库存（比如购物车批量结算等场景）
    void batchDecreaseStock(List<String> productIds, List<Integer> quantities);
    // 新增接口方法示例，用于获取多个商品的库存预警配置信息
    List<StockWarningConfig> getStockWarningConfigs(List<String> productIds);
}